#ifndef _speed_pid_h_
#define _speed_pid_h_

//#include "bldc.h"
              
extern float Speed_Pid_Out;             

typedef struct
{
	float Kp;
  float Ki;
  float Max_Output;
  float Min_Output;
  float I_Sum;
	float error;
	float output;
	float up;
	
	float ref;
	float fbk;
}SPEED_PID_DEF;
extern SPEED_PID_DEF speed_pid;

void speed_pid_init(float motor_J, float motor_flux, unsigned int Pole, unsigned int N);
void Speed_pid_c(SPEED_PID_DEF* speed_pid_temp);

void Re_speed_init(void);
#endif                            
